#ifndef CAPTURETHREAD_H
#define CAPTURETHREAD_H

#include <QThread>
#include <QDebug>
#include <QGuiApplication>
#include <QScreen>
#include <QPixmap>
#include <QBuffer>

class TcpSession;

class CaptureThread : public QThread
{
    Q_OBJECT

public:
    explicit CaptureThread(TcpSession* session, QObject *parent = nullptr);
    ~CaptureThread();


    void init();
    void run();
signals:
    void pixCaptured(QPixmap pix);
private:
    TcpSession* session;
    int interval_us;//截屏间隔，单位us

};

#endif // CAPTURETHREAD_H
